package cn.edu.scau.cmi.linjinyong.client;

import cn.edu.scau.cmi.linjinyong.spring.Student;
import cn.edu.scau.cmi.linjinyong.spring.Teacher;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringClient {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        Student student = (Student) ac.getBean("student");
        Teacher teacher = (Teacher) ac.getBean("teacher");
        System.out.println(student);
        System.out.println(teacher);
    }
}
